import axios from './index'
import {getUser} from './global_user'
let baseUrl = 'http://192.168.88.120:8888';
//登录
export const requestLogin=params=>{
   return axios.post(`${baseUrl}/login`,params);
}
//获取菜单列表
export const requestMenu=params=>{
    let headers = getUser();
    return axios.get(`${baseUrl}/menu/list`,params,headers);
}
//修改菜单
export const requestEditMenu=params=>{
    let headers = getUser();
    return axios.post(`${baseUrl}/menu/edit`,params,headers)
}
//跳转添加菜单列表
export const requestAddMenu=params=>{
    let headers = getUser();
    return axios.get(`${baseUrl}/menu/add`,params,headers)
}
//添加并保存菜单
export const rquestSaveMenu=params=>{
    let headers = getUser();
    return axios.post(`${baseUrl}/menu/save`,params,headers)
}
//删除菜单
export const delMenu=params=>{
    let headers = getUser();
    return axios.delete(`${baseUrl}/menu/del`,params,headers)
}
//添加图片保存
export const addBanner=params=>{
    let headers = getUser();
    return axios.post(`${baseUrl}/banner/add`,params,headers)
}